/*
* overlay.js
* author : Adrian FOATA (gmail.com)
		   Armand GUEIT (armand.gueit@gmail.com)
*/


//////////////////////////////////////////
// Function wich send the selected text to MySweetNote
//
/////////////////////////////////////////

function send2MSN(){
	
	alert("toto");
	
	/*var focusedWindow = document.commandDispatcher.focusedWindow;
	// check if you are in the good window focused
	if (focusedWindow == window) {
	    focusedWindow = _content;
	  }
	  // declaration and initialization of docCharset
	  var docCharset = null;
	  //if it's the good window focused
	  if (focusedWindow){
	    docCharset = "charset=" + focusedWindow.document.characterSet;
	  }
	  // put the selection text in getSel
	  var getSel = Components.lookupMethod(focusedWindow, "getSelection");
	  var copiedToQN = getSel.apply(focusedWindow, []); // i.e. focusedWindow.getSelection();

	  var copiedToQN2 = copiedToQN + "--" + focusedWindow.location.href;
	*/
	var file = new ActiveXObject("Scripting.FileSystemObject");
	var a = file.CreateTextFile("testfile.txt", true);
	a.WriteLine("Salut cppFrance !");
	a.Close();
	
}